﻿@using ViewRes
@using YuYuKiCms.Model

<ul class="art-hmenu">
    @{
        var controller = ViewContext.RouteData.Values["controller"].ToString();

        if (!controller.Equals("Page", StringComparison.OrdinalIgnoreCase))
        {
            Html.RenderAction("PageMenu", "Page");
        }
    }

    @if (Request.IsAuthenticated)
    {
        @Html.Partial("MenuLink", new MenuLinkVm {Controller = "Theme", Action = "Index", LinkText = "Theme"})
        @Html.Partial("MenuLink", new MenuLinkVm {Controller = "Page", Action = "Index", LinkText = ViewRes.Page.Page_manager})
        @Html.Partial("MenuLink", new MenuLinkVm {Controller = "Account", Action = "Logoff", LinkText = Account.LogOff})
    }
    else
    {
        @Html.Partial("MenuLink", new MenuLinkVm {Controller = "Account", Action = "Login", LinkText = Account.LogIn, RouteValues = new {returnUrl = Request.RawUrl}})
        @Html.Partial("MenuLink", new MenuLinkVm {Controller = "Account", Action = "Registration", LinkText = Account.Register, RouteValues = new {returnUrl = Request.RawUrl}})
    }
</ul>

@*<section id="Language">
    @Html.Partial("ChangeLanguage")
</section>*@